<!--$embed{"header.htm"}-->

<!--$if{ op == 'delete'}-->

<div <!--$if{ !_SGLOBAL['inajax']}-->class="inpage"<!--$end-->>
<form method="post" action="cp.html?ac=blog&op=delete&blogid=${blogid}">
	<h1>确定删除指定的日志吗？</h1>
	<p class="btn_line">
		<input type="hidden" name="refer" value="${_SGLOBAL['refer']}" />
		<input type="hidden" name="deletesubmit" value="true" />
		<input type="submit" name="btnsubmit" value="确定" class="submit" />
		<!--$if{ _SGLOBAL['inajax']}--><input type="button" name="btnclose" value="取消" onclick="hideMenu();" class="button" /><!--$end-->
	</p>
<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
</form>
</div>

<!--$else-->

$#<script language="javascript" src="image/editor/editor_function.js"></script>
<script language="javascript" src="source/editor_function.js"></script>
<script language="javascript" src="template/default/cp_blog.js"></script>


<h2 class="title"><img src="image/app/blog.gif" />日志</h2>
<div class="tabs_header">
	<ul class="tabs">
		<!--$if{ blog[blogid]}-->
		<li class="active"><a href="cp.html?ac=blog&blogid=${blog['blogid']}"><span>编辑日志</span></a></li>
		<!--$end-->
		<li<!--$if{ !blog.blogid}--> class="active"<!--$end-->><a href="cp.html?ac=blog"><span>发表新日志</span></a></li>
		<!-- $* 	
		<li><a href="cp.html?ac=import"><span>日志导入</span></a></li>
		*$ -->
		<li><a href="space.html?uid=${space['uid']}&do=blog&view=me"><span>返回我的日志</span></a></li>
	</ul>
</div>


<style>
	.userData {behavior:url(#default#userdata);}
</style>

<div class="c_form">
	<form method="post" action="cp.html?ac=blog&blogid=${blog['blogid']}" enctype="multipart/form-data">
		<table cellspacing="4" cellpadding="4" width="100%" class="infotable">
			<tr>
				<td>
					<select name="classid" id="classid" onchange="addSort(this, 'classname')">
						<option value="0">选择分类</option>
						<!--$for{value:classarr}-->
						<!--$if{ value['classid'] == blog['classid']}-->
						<option value="${value['classid']}" selected>${value['classname']}</option>
						<!--$else-->
						<option value="${value['classid']}">${value['classname']}</option>
						<!--$end-->
						<!--$end-->
						<!--$if{ !blog['uid'] || blog['uid']==_SGLOBAL['supe_uid']}--><option value="addoption" style="color:red;">+新建分类</option><!--$end-->
					</select>
					<input type="text" class="t_input" id="subject" name="subject" value="${blog['subject']}" size="60"  /> <!-- onblur="relatekw();" -->
				</td>
			</tr>
			<tr>
				<td>
				  	<textarea class="userData" name="message" id="realmessage" style="height:100%;width:100%;display:none;border:0px"></textarea>
				  	<textarea id="blog-message" style="width:700px;height:300px;visibility:hidden;" >${blog.message}</textarea>
		            <script type="text/javascript" charset="utf-8" src="common/kindeditor/kindeditor.js"></script>
		            <script type="text/javascript">
		            KE.show({
		                id : 'blog-message',
		                cssPath : './index.css',
		                items : [
		                   'undo', 'redo', 'fontname', 'fontsize', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
		                   'removeformat', 'image','flash','media','link','unlink']
		            });
		            </script> 
				</td>
			</tr>
		</table>
		<table cellspacing="4" cellpadding="4" width="100%" class="infotable">
			<tr>
				<th width="100">标签</th>
				<td><input type="text" class="t_input" size="40" id="tag" name="tag" value="${blog['tag']}"> <!-- <input type="button" name="clickbutton[]" value="自动获取" class="button" onclick="relatekw();"> --></td>
			</tr>
			<!--$if{ blog['uid'] && blog['uid']!=_SGLOBAL['supe_uid']}-->
			<!-- ${selectgroupstyle}='display:none'-->
			<tbody style="display:none;">
			<!--$end-->
			<tr>
				<th>隐私设置</th>
				<td>
					<select name="friend" onchange="passwordShow(this.value);">
						<option value="0"${friendarr[0]}>全站用户可见</option>
						<option value="1"${friendarr[1]}>全好友可见</option>
						<option value="2"${friendarr[2]}>仅指定的好友可见</option>
						<option value="3"${friendarr[3]}>仅自己可见</option>
						<option value="4"${friendarr[4]}>凭密码查看</option>
					</select>
					<span id="span_password" style="${passwordstyle}">密码:<input type="text" name="password" value="${blog['password']}" size="10"></span>
					<input type="checkbox" name="noreply" value="1"<!--$if{ blog[noreply]}--> checked<!--$end-->> 不允许评论
				</td>
			</tr>
			<!--$if{ blog['uid'] && blog['uid']!=_SGLOBAL['supe_uid']}--></tbody><!--$end-->
			<tbody id="tb_selectgroup" style="${selectgroupstyle}">
			<tr>
				<th>指定好友</th>
				<td><select name="selectgroup" onchange="getgroup(this.value);">
					<option value="">从好友组选择好友</option>
					<!--$for{entry:groups} $set{value = entry.value} $set{key = entry.key}-->
					<option value="${key}">${value}</option>
					<!--$end-->
					</select> 多次选择会累加到下面的好友名单</td>
			</tr>
			<tr>
				<th>&nbsp;</th>
				<td>
				<textarea name="target_names" id="target_names" style="width:85%;" rows="3">${blog['targetNames']}</textarea>
				<br>(可以填写多个好友名，请用空格进行分割)</td>
			</tr>
			</tbody>
		<!--$if{ checkpermseccode }-->
			<!--$if{ _SCONFIG['questionmode']}-->
			<tr>
				<th style="vertical-align: top;">请回答验证问题</th>
				<td>
					<p><!--${&com.heaven.web.utils.Common.question()}--></p>
					<input type="text" id="seccode" name="seccode" value="" size="15" class="t_input" />
				</td>
			</tr>
			<!--$else-->
			<tr>
				<th style="vertical-align: top;">请填写验证码</th>
				<td>
					<script>seccode();</script>
					<p>请输入上面的4位字母或数字，看不清可<a href="javascript:updateseccode()">更换一张</a></p>
					<input type="text" id="seccode" name="seccode" value="" size="15" class="t_input" />
				</td>
			</tr>
			<!--$end-->
		<!--$end-->
		</table>
		<input type="hidden" name="blogsubmit" value="true" />
		<input type="submit" id="blogbutton" name="blogbutton" value="提交发布" onclick="return validate(this);" style="display: none;" />
		<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
	</form>
	<table cellspacing="4" cellpadding="4" width="100%" class="infotable">
		<tr>
			<th width="100">&nbsp;</th>
			<td><input type="button" id="issuance" onclick="document.getElementById('blogbutton').click();" value="保存发布" class="submit" /></td>
		</tr>
	</table>
</div>

<!--$end-->
<!--$embed{"footer.htm"}-->